﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RayDen.SceneLab.Controllers.FormControllers;

namespace RayDen.SceneLab.UI
{
    public partial class MaterialEditForm : Form
    {
        protected MaterialEditFormController Controller;

        public PropertyGrid PropertyGrid
        {
            get { return this.ctlPropertyGrid; }
        }

        public MaterialEditForm()
        {
            InitializeComponent();
            Controller = new MaterialEditFormController(this);
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.Controller.Select();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            PropertyGrid.SelectedObject = this.Controller.Material.MData;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Controller.Select();
        }
    }
}
